package com.xjrh.traintravel.collector.netty.command.upgrade;

import com.xjrh.traintravel.collector.netty.command.BaseCommand;

import java.io.Serializable;

/**
 * 升级文件-获取版本信息命令响应
 *
 * @author snps
 * @create 2022-03-02 15:01
 * @describe
 **/
public class UpgradeVersionApply extends BaseCommand implements Serializable {

    private static final long serialVersionUID = -3304110069105843911L;


    /**
     * 主版本
     */
    private int v1;

    /**
     * 子版本
     */
    private int v2;

    /**
     * 版本号
     */
    private String version;

    /*****************************************
     * Getter and Setter
     */
    public int getV1() {
        return v1;
    }

    public void setV1(int v1) {
        this.v1 = v1;
    }

    public int getV2() {
        return v2;
    }

    public void setV2(int v2) {
        this.v2 = v2;
    }

    public String getVersion() {
        return v1 + "." + v2;
    }

    public void setVersion(String version) {
        this.version = version;
    }


    @Override
    public String toString() {
        return "UpgradeVersionApply{" +
                "v1=" + v1 +
                ", v2=" + v2 +
                ", version='" + version + '\'' +
                '}';
    }

}